https://leetcode.cn/problems/longest-common-prefix/description/
class Solution {
public:
    string longestCommonPrefix(vector<string>& strs) {
        for(int i=0;i<strs[0].size();i++)
        {
            char ch=strs[0][i];
            for(string &str :strs)
            {
                if(i==str.size()||str[i]!=ch)
                    return strs[0].substr(0,i); 
            }

        }
        return strs[0];
    }
};